//
//  MyCollectionReusableView.m
//  22-QQMusic
//
//  Created by Snow on 16/8/13.
//  Copyright © 2016年 Snow. All rights reserved.
//

#import "MyCollectionReusableView.h"
#define kWidth self.frame.size.width
#define kHeight self.frame.size.height


@interface MyCollectionReusableView ()
@property (nonatomic, strong) UIButton *button;
@end
@implementation MyCollectionReusableView
- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _labelOfTitle = [[UILabel alloc] init];
        _button = [UIButton buttonWithType:UIButtonTypeCustom];
        [self addSubview:_button];
        [self addSubview:_labelOfTitle];
        }
    return self;
}
- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    _button.frame = CGRectMake(kWidth - 50, 0, 50, 20);
    [_button setTitle:@"更多 >" forState:UIControlStateNormal];
    _button.titleLabel.font = [UIFont systemFontOfSize:12];
    _labelOfTitle.frame = CGRectMake(0, 0, kWidth, kHeight);
}

@end
